﻿Public Class UsuarioObj
    Inherits ClaseBaseObj

#Region "Declaraciones"
    Private _Nombre As String
    Private _Login As String
    Private _PassWord As String
    Private _LoginEncriptado As String
    Private _PasswordEncriptado As String
#End Region

#Region "Propiedades"
    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Login() As String
        Get
            Return _Login
        End Get
        Set(ByVal value As String)
            _Login = value
            _LoginEncriptado = EncriptarObj.EncryptString(value, SerialObj.Seed)
        End Set
    End Property

    Public Property PassWord() As String
        Get
            Return _PassWord
        End Get
        Set(ByVal value As String)
            _PassWord = value
            _PasswordEncriptado = EncriptarObj.EncryptString(value, SerialObj.Seed)
        End Set
    End Property

    Public Shared Property LoginConfiguracion() As String
        Get
            Return EncriptarObj.DecryptString(My.Settings.Login, SerialObj.Seed)
        End Get
        Set(ByVal Value As String)
            My.Settings.Login = EncriptarObj.EncryptString(Value, SerialObj.Seed)
            My.Settings.Save()
        End Set
    End Property

    Public Shared Property PasswordConfiguracion() As String
        Get
            Return EncriptarObj.DecryptString(My.Settings.Password, SerialObj.Seed)
        End Get
        Set(ByVal Value As String)
            My.Settings.Password = EncriptarObj.EncryptString(Value, SerialObj.Seed)
            My.Settings.Save()
        End Set
    End Property

    Public ReadOnly Property LoginEncriptado() As String
        Get
            Return _LoginEncriptado
        End Get
    End Property

    Public ReadOnly Property PasswordEncriptado() As String
        Get
            Return _PasswordEncriptado
        End Get
    End Property

#End Region

End Class
